/*
 * @Description:Axios封装
 *   .--,       .--,
 *   ( ( \.---./ ) )
 *   '.__/o   o\__.'
 *      {=  ^  =}
 *       >  -  <
 *      /      \
 *     // blog  \\
 *    //|   .   |\\
 *    "'\       /'"_.-~^`'-.
 *       \  _  /--'
 *     ___)( )(___
 *    (((__) (__)))
 * @Author: Mainkeys
 * @Date: 2023-09-22 21:13:52
 * @LastEditTime: 2023-09-25 21:59:18
 * @LastEditors: Mainkeys
 */

import axios from 'axios';


const http = axios.create({
  baseURL: 'http://localhost:8080',
  timeout: 5000
});

http.get = function(url, options = {}) {
  return http({
    method: 'get',
    url,
    ...options
  });
};

http.post = function(url, data = {}, options = {}) {
  return http({
    method: 'post',
    url,
    data,
    ...options
  });
};

export default http;